﻿<ResourceDictionary  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">    
    <Style x:Key="LinkButton" TargetType="{x:Type RadioButton}">
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RadioButton}">
					<TextBlock Text="{TemplateBinding Content}" TextWrapping="Wrap" FontFamily="Arial" Foreground="#FFFFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="textBlock">
						<TextBlock.BitmapEffect>
							<OuterGlowBitmapEffect Opacity="0" GlowColor="#FFEDE2A2"/>
						</TextBlock.BitmapEffect>
					</TextBlock>
					<ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                        	<Setter Property="BitmapEffect" TargetName="textBlock">
                        		<Setter.Value>
                        			<OuterGlowBitmapEffect GlowColor="#FFEDE2A2" Opacity="0.5"/>
                        		</Setter.Value>
                        	</Setter>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="BitmapEffect" TargetName="textBlock">
                                <Setter.Value>
                                    <OuterGlowBitmapEffect GlowColor="#FFEDE2A2" Opacity="0.5"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style x:Key="BtnGeneric" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Border BorderBrush="#FF102767" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3">
						<Grid>
							<Rectangle x:Name="rect" Margin="0,0,0,0" Stroke="#FFFFFFFF" RadiusX="2" RadiusY="2" Fill="{DynamicResource InactiveGradient}"/>
							<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Arial" FontSize="10" Foreground="#FF102767" Text="{TemplateBinding Content}" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontWeight="Bold"/>
						</Grid>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="ToggleButton.IsChecked" Value="true"/>  
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="rect" Value="{DynamicResource OrangeGradient}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Opacity" TargetName="rect" Value=".65" />
                        </Trigger>                                 
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
    <Style x:Key="BigCheckBoxStyle" TargetType="{x:Type CheckBox}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type CheckBox}">
					<Grid Width="Auto" Height="Auto">
						<StackPanel Orientation="Horizontal">
							<Border Width="25" Height="25" BorderBrush="#FF3D4F73" BorderThickness="2,2,2,2" Background="#FFF" CornerRadius="3,3,3,3">
								<Grid>
									<Rectangle Width="Auto" Height="Auto" RadiusX="0" RadiusY="0" Margin="0,0,0,0">
										<Rectangle.Fill> 
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.489,-0.102">
												<GradientStop Color="#FFCCCCCC" Offset="0.223"/>
												<GradientStop Color="#FFFFFFFF" Offset="0.808"/>
												<GradientStop Color="#FF999999" Offset="0.018"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
							</Border>
							<TextBlock HorizontalAlignment="Stretch" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14" Text="{TemplateBinding Content}" TextWrapping="Wrap"/>
						</StackPanel>
						<Viewbox Width="30.75" Height="Auto" HorizontalAlignment="Left" x:Name="check" Visibility="Hidden" Margin="-1,0,0,5.831" >
							<Canvas Width="67.016602" Height="65.242188">
								<Canvas>
									<!-- Layer 1/<Path> -->
									<Path StrokeThickness="1.000000" Stroke="#ffffffff" StrokeMiterLimit="1.000000" Fill="#ff119e48" Data="F1 M 19.379883,30.112305 L 28.214844,47.229980 C 28.214844,47.229980 42.571289,12.442871 65.210449,0.847168 C 64.658203,9.129883 62.449219,16.308105 66.314941,25.143066 C 56.375488,27.351563 35.945313,52.199219 29.318848,64.347168 C 19.932129,52.751465 8.888672,43.916992 1.158203,41.155762 L 19.379883,30.112305 Z"/>
								</Canvas>
							</Canvas>
						</Viewbox>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="HasContent" Value="true" />											
						<Trigger Property="IsEnabled" Value="false" />
                        <Trigger Property="IsChecked" Value="true" >
                        	<Setter Property="Visibility" TargetName="check" Value="Visible"/>
                        </Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <ControlTemplate x:Key="ImageButton" TargetType="{x:Type Button}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="MouseOver">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="MouseOut">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.7"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0500000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.7"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Opacity="0.7" x:Name="contentPresenter" Cursor="Hand">
        </ContentPresenter>

        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" SourceName="contentPresenter" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource MouseOver}"/>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="MouseOut_BeginStoryboard" Storyboard="{StaticResource MouseOut}"/>
                </Trigger.ExitActions>
            </Trigger>
            <!--<Trigger Property="IsPressed"  Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="PressedOn_BeginStoryboard" Storyboard="{StaticResource PressedOn}"/>
                </Trigger.EnterActions>-->
                <!--<Trigger.ExitActions>
                    <BeginStoryboard x:Name="PressedOff_BeginStoryboard" Storyboard="{StaticResource PressedOff}"/>
                </Trigger.ExitActions>
            </Trigger>-->
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="contentPresenter" Value="0.2"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <BitmapImage x:Key="callIcon" UriSource="..\Images\iconCall.png" />
    <BitmapImage x:Key="chatIcon" UriSource="..\Images\iconChat.png" />
    <BitmapImage x:Key="comCallIcon" UriSource="..\Images\iconComCall.png" />
    <BitmapImage x:Key="iconDelete" UriSource="..\Images\iconDelete.png" />
    
    
    <Storyboard x:Key="fadeIn">
        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Member=Visibility.Visible}" />
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation To="1" Duration="0:0:0.3" Storyboard.TargetProperty="Opacity" />
    </Storyboard>
    <Storyboard x:Key="fadeOut">
        <DoubleAnimation To="0" Duration="0:0:0.4" Storyboard.TargetProperty="Opacity" />
        <ObjectAnimationUsingKeyFrames Duration="0:0:0.4" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Member=Visibility.Hidden}" />
        </ObjectAnimationUsingKeyFrames>
    </Storyboard>

</ResourceDictionary>